<!DOCTYPE HTML>
<html>
<head>
<title>Dialecto Designer</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<link rel="stylesheet" href="css/designer.css" type="text/css" />
<script type='text/javascript' src='scripts/canvas.js'></script>
<script type='text/javascript' src='scripts/dialecto.js'></script>
</head>
<body>
<div id="screen">
	<div class="paper">
		<div class="stub"></div>
		<div id="boardContainer">
			<canvas id="board" width="900" height="900" />
		</div>
	</div>
	<div id="toolbar">
		<div class="title">Dialecto Web</div>
		<button></button>
	</div>
	<div id="toolbox">
		<button class="assign" />
		<button class="if" />
	</div>
</div>
<script>
	ctx = new Context2D("board");
	decision = new Dialecto.If("true");
	decision.left.add (new Dialecto.Assignment("y", "\"Emanuel Andrada\""));
	//decision.left.add (new Dialecto.Iterator("i", "1", "10"));
	bucle = new Dialecto.For("i", "asdsadsadasd", "10"); 
	bucle.sequence.add (new Dialecto.Assignment("edad", "26"));
	bucle.sequence.add (new Dialecto.Assignment("edad", "26"));
	bucle.sequence.add (new Dialecto.Assignment("edad", "26"));
	bucle.sequence.add (new Dialecto.Assignment("edad", "26"));
	bucle.sequence.add (new Dialecto.Assignment("nombre", "23asdddddddddddddddddddddddddddddddddddddddddddddddddddddddd"));
	bucle.sequence.add (new Dialecto.Assignment("edad", "26"));
	bucle.sequence.add (new Dialecto.Assignment("edad", "26"));
	bucle.sequence.add (new Dialecto.Assignment("edad", "26"));
	bucle.sequence.add (new Dialecto.Assignment("edad", "26"));
// 	bucle.sequence.add (new Dialecto.Assignment("edad", "26"));
// 	bucle.sequence.add (new Dialecto.Assignment("edad", "26"));
// 	bucle.sequence.add (new Dialecto.Assignment("edad", "26"));
// 	bucle.sequence.add (new Dialecto.Assignment("edad", "26"));
	decision.right.add(bucle);
	ctx.reset();
	size = decision.getSize(ctx);
	ctx.canvas.width = size.width + 2;
	ctx.canvas.height = size.height + 2;
	ctx.reset();
	ctx.translate(ctx.canvas.width / 2, 1);
	decision.draw(ctx);
</script>
</body>
</html>